//
//  TMCourseRemainCell.m
//  国学培训用户端
//
//  Created by Tao Li on 2018/7/18.
//  Copyright © 2018年 mac. All rights reserved.
//

#import "TMCourseRemainCell.h"
#import "TMMyCourseModel.h"
@implementation TMCourseRemainCell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
    self.selectionStyle = UITableViewCellSelectionStyleNone;
    self.iconImage.contentMode = UIViewContentModeScaleAspectFill;
    self.iconImage.clipsToBounds = YES;
}
- (IBAction)remindAction:(UIButton *)sender {
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}
- (void)setModel:(TMMyCourseModel *)model{
    _model = model;
    if (model.photo.count>0) {
        [self.iconImage sd_setImageWithURL:[NSURL URLWithString:[NSString stringWithBaseUrl:model.photo[0]]] placeholderImage:kPlaceholder];
    }
    self.courseLabel.text = model.name;
    self.prcieLabel.text = [NSString stringWithFormat:@"¥%.02f",model.price];
    self.dateLabel.text = [NSString stringWithFormat:@"时间:%@", [SPToolSet stringFromDateString:model.s_time]];
}
@end
